<?php
	echo $this->Html->script(array('ckeditor/ckeditor','ckfinder/ckfinder'));
?>
<script language="javascript" type="text/javascript">
/*<![CDATA[*/
	$(function(){
		$("#lnkSave").click(function(){
			$('#adminForm').submit();
		});
	});
/*]]>*/
</script>
<div id="content-box">
	<div class="border">
		<div class="padding">
			<div id="toolbar-box">
   			<div class="t"><div class="t"><div class="t"></div></div></div>
			<div class="m">
				<div class="toolbar" id="toolbar">
				<table class="toolbar">
				<tr>
					<td class="button" id="toolbar-save">
					<a href="javascript:;//Cập nhật" id="lnkSave" class="toolbar">
						<span class="icon-32-save" title="Cập nhật"></span>
						Cập nhật
					</a>
					</td>
				</tr>
				</table>
				</div>
				<div class="header icon-48-langmanager">Cấu hình website</div>
				<div class="clr"></div>
			</div>
			<div class="b"><div class="b"><div class="b"></div></div></div>
			</div>
			<div class="clr"></div>
			<div id="element-box">
				<div class="t"><div class="t"><div class="t"></div></div></div>
				<div class="m">
				<?php echo $form->create(null, array( 'url' => DOMAIN.'/company/edit','type' => 'post','enctype'=>'multipart/form-data','name'=>'image','id'=>'adminForm')); ?>   
					<div class="col width-60">
						<fieldset class="adminform">
						<legend>Thông tin công ty</legend>
						<table class="admintable" cellspacing="1">
						<tr>
							<td width="150" class="key">
								<label for="txtten">Tên</label>
							</td>
							<td>
								 <?php echo $this->Form->input('name',array('label'=>'','id'=>'txtten','class'=>'inputbox')); ?>
                                  <?php echo $this->Form->input('id',array('type'=>'hidden','label'=>'','id'=>'txtten','class'=>'inputbox')); ?>
							</td>
						</tr>
                        
						<tr>
							<td class="key">
								<label for="txtdiachi">Địa chỉ</label>
							</td>
							<td>
								 <?php echo $this->Form->input('add',array('label'=>'','id'=>'txtdiachi','class'=>'inputbox')); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<label for="txtdienthoai">Điện thoại</label>
							</td>
							<td>
								<?php echo $this->Form->input('mobile',array('label'=>'','id'=>'txtdienthoai','class'=>'inputbox')); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<label for="txtPlan">Fax</label>
							</td>
							<td>
								<?php echo $this->Form->input('fax',array('label'=>'','class'=>'inputbox')); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<label for="txthotline">Hotline</label>
							</td>
							<td>
								<?php echo $this->Form->input('hotline',array('label'=>'','class'=>'inputbox')); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<label for="txtemail">Email</label>
							</td>
							<td>
								<?php echo $this->Form->input('email',array('label'=>'','class'=>'inputbox')); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<label for="txtyahoo1">Yahoo 1</label>
							</td>
							<td>
								<?php echo $this->Form->input('yahoo1',array('label'=>'','class'=>'inputbox')); ?>
							</td>
						</tr>
						<tr >
							<td class="key">
								<label for="txtyahoo2">Yahoo 2</label>
							</td>
							<td>
								<?php echo $this->Form->input('yahoo2',array('label'=>'','class'=>'inputbox')); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<label for="txtskype">Skyper</label>
							</td>
							<td>
								<?php echo $this->Form->input('skype',array('label'=>'','class'=>'inputbox')); ?>
							</td>
						</tr>
                        <tr>
							<td class="key">
								<label for="txtskype">Skyper1</label>
							</td>
							<td>
								<?php echo $this->Form->input('skype1',array('label'=>'','class'=>'inputbox')); ?>
							</td>
						</tr>
                        <tr>
							<td width="150" class="key">
								<label for="fileLogo">Logo công ty</label>
							</td>
							<td>
								
                               <?php echo $this->Form->input('images',array('class'=>'inputbox','id'=>'txtImage','size'=>'40','label'=>false,'readonly'=>true,'id'=>'imagesid')); ?> 
    <div class="inputbox" id="fileLogo" style="position:relative; top:-20px; left:230px;"><a href="javascript:window.open('<?php echo DOMAIN; ?>/upload.php','images','left=400,top=100,width=500,height=300');window.history.go(1)">Upload</a></div>
    <div class="functionBtnEvent" style="width:100%; padding-left:11px;">  <?php if($data['Company']['images'] == "") {$imagesnow="img/no-images.jpg";} else {
		$imagesnow=$data['Company']['images'];
		}?>
    <img id="images-default" name="imagesdefault" src="<?php echo DOMAIN ?>/<?php echo $imagesnow;?>" width="100"></img></div>
							</td>
						</tr>
						<tr>
							<td class="key">
								<label for="txtslogan">Slogan</label>
							</td>
							<td>
								<?php echo $this->Form->input('slogan',array('label'=>'','class'=>'inputbox')); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<label for="txtbanquyen">Bản quyền</label>
							</td>
							<td>
								<?php  echo $this->Form->input('copyright', array('cols'=>82, 'rows'=>5, 'type'=>'textarea','label'=>''));?> 
							</td>
						</tr>
                          
						
						
                      <tr>
							<td class="key">
								<label for="txtbanquyen">Giới thiệu</label>
							</td>
							<td>
								<?php  echo $this->Form->input('Company.introduction',array('label'=>'')).$this->TvFck->create('Company.introduction',array('toolbar'=>'extra','height'=>'150px','width'=>'600')); ?>
							</td>
						</tr>
						</table>
						</fieldset>
					</div>
					<div class="col width-40">
						<fieldset class="adminform">
						<legend>Cấu hình site</legend>
						<table cellspacing="1" class="admintable">
						<tbody>
						
						<tr>
							<td class="key">
								<label for="txtdodai3">Khóa website</label>
							</td>
							<td>
                           <?php 
						   if($data['Company']['close']==1){
						   echo $form->radio('close', array(0 => 'Có', 1 => 'Không'), array('value' => '1','legend'=>''));
						   }elseif($data['Company']['close']==0){
							  echo $form->radio('close', array(0 => 'Có', 1 => 'Không'), array('value' => '0','legend'=>''));
							 }
						   ?>
								
							</td>
						</tr>
						<tr>
							<td width="150" class="key">
								<label for="txtthongbao">Thông báo ngừng website</label>
							</td>
							<td>
								
                                <?php  echo $this->Form->input('note', array('cols'=>50, 'rows'=>5,'type'=>'textarea','label'=>''));?> 
							</td>
						</tr>
						
					  <tr>
							<td class="key">
								<label for="txtbanquyen">Title 	</label>
							</td>
							<td>
								<?php  echo $this->Form->input('title', array('cols'=>50, 'rows'=>5, 'type'=>'textarea','label'=>''));?> 
							</td>
						</tr>
                        <tr>
							<td class="key">
								<label for="txtbanquyen">Keyword</label>
							</td>
							<td>
								<?php  echo $this->Form->input('keyword', array('cols'=>50, 'rows'=>5, 'type'=>'textarea','label'=>''));?> 
							</td>
						</tr>
                      
                        <tr>
							<td class="key">
								<label for="txtbanquyen">Mô tả</label>
							</td>
							<td>
								<?php  echo $this->Form->input('description', array('cols'=>50, 'rows'=>5, 'type'=>'textarea','label'=>''));?> 
							</td>
						</tr>
						</tbody></table>
						</fieldset>
					</div>
					<div class="clr"></div>
				
				<!-- </form>-->
                   <?php echo $form->end(); ?>
				<div class="clr"></div>
				</div>
				<div class="b"><div class="b"><div class="b"></div></div></div>
			</div>
			
			<div class="clr"></div>
		</div>
		<div class="clr"></div>
	</div>
</div>

